<!--添加、编辑 -->
<div class="dialog_content">
	<form id="info_form" action="{:U('question/oppt')}" method="post">
        <input type="hidden" name="opttype" value="{$type}" />
       	<input type="hidden" name="id" value="{$info.id}" />
	<table width="100%" class="table_form">
		<tr> 
			<th width="120">{:L('article_cate_parent')} :</th>
			<td>
				<select class="J_cate_select mr10" data-pid="0" data-uri="{:U('question/ajax_getchilds',array('max_level'=>$currentInfo['level']+1))}" data-selected="{$info['spid']}"></select>
				<input type="hidden" name="pid" id="J_cate_id" />
			</td>
		</tr>
		<tr>
			<th>名称 :</th>
			<td><input type="text" name="name" id="name" class="input-text" value="{$info.name}" size="30"></td>
		</tr>
        <if condition="$currentInfo['level'] eq 0 and $info['spid']">
		<tr>
			<th>类型 :</th>
			<td>
            <!--2为radio，3为text，4为chackbox-->
                <label>
                    <input <if condition="$info.type eq 2"> checked=""</if> type="radio" name="type" value="2" />radio
                </label>
                <label>
                    <input <if condition="$info.type eq 2"> checked=""</if> type="radio" name="type" value="3" />text          
                </label>
                <label>
                     <input <if condition="$info.type eq 2"> checked=""</if> type="radio" name="type" value="4" />chackbox   
                </label>
            
            </td>
		</tr>   
        </if>
		<tr>
			<th>{:L('sort_order')} :</th>
			<td><input type="text" name="ordid" id="ordid" class="input-text" value="{$info.ordid}"  size="10"></td>
		</tr>                 
        <tr>
		<th>{:L('enabled')} :</th>
            <td>
                <label><input type="radio" <if condition="$info['status'] eq 1"> checked=""</if> name="status" value="1" checked> {:L('yes')}</label>&nbsp;&nbsp;
                <label><input type="radio" <if condition="$info['status'] eq 0"> checked=""</if> name="status" value="0"> {:L('no')}</label>
            </td>
        </tr>
	
	</table>
	</form>
</div>
<script src="__STATIC__/js/fileuploader.js"></script>
<script>
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#name").formValidator({onshow:lang.please_input+"名称",onfocus:lang.please_input+"名称"}).inputValidator({min:1,onerror:lang.please_input+"名称"});
	
	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.status == 1){
			$.dialog.get(result.dialog).close();
			$.pinphp.tip({content:result.msg});
			window.location.reload();
		} else {
			$.pinphp.tip({content:result.msg, icon:'alert'});
		}
	}
	$('.J_cate_select').cate_select();
});
</script>